package com.jieao.content.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jieao.common.core.domain.BaseEntity;
import com.jieao.framework.util.ShiroUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description 文章
 * @Author weifanl
 * @Date2020/5/21 15:34
 **/
@Data
@TableName("content_article")
@EqualsAndHashCode(callSuper = true)
public class Article extends BaseEntity {
    private static final long serialVersionUID = 1L;
    @TableId
    private  Long   id;			//文章id
    private  Long   catalogId;			//目录id
    private  String   title;			//文章标题
    private  String   desca;			//文章描述
    private  Long   subId;			//文章内容id
    private  String   isDiscuss;			//是否可以评论
    private  String   isRelease;			//是否发布
    /** 发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date releaseTime;
    private  String   isTop;			//是否置顶: 是 Y 否 N
    private  Long   lastArticleId;			//上一篇文章id
    private  Long   nextArticleId;			//下一篇文章id
    private  Integer   delFlag;			//删除标志（0代表存在 2代表删除）

    private  String  articleUrl;        //文章url
    private  String  articleTags;         //文章标签
    private  String  articleType;       //文章类型：原创 YC 转载 ZZ

    public Article(){
        this.delFlag = 0;
        setUpdateBy(ShiroUtils.getLoginName());
        setUpdateTime(new Date());
    }
}
